def demo1():
    num = int(input("输入一个整数："))
    return num


def demo2():
    num2 = demo1()
    print('I am demo2')  # demo1()错误就不会执行这里
    return num2


try:
    print(demo2())
except Exception as e:
    print(e)
